const bcrypt = require('bcryptjs');
/**使用brypt加密 */
module.exports = async (ctx, next) => {
  const { password } = ctx.request.body
  const salt = bcrypt.genSaltSync(10);
  const hash = bcrypt.hashSync(password, salt);
  ctx.request.body.password = hash
  await next()
}

